//  @ Project : GagalPanen
//  @ File Name : inventory.hpp
//  @ Date : 3/9/2011
//  @ Author : Denis
//
//


#if !defined(_INVENTORY_H)
#define _INVENTORY_H

#include <iostream>
#include <vector>
#include <assert.h>
#include "item.hpp"
#include "itemslot.hpp"
#include "fruit.hpp"
#include "seed.hpp"
#include "gameinterface.hpp"

class Inventory {
public:
  // normal constructor
  Inventory(GameInterface* game);

  // load game constructor
  Inventory(GameInterface* game, std::ifstream& is);

  virtual void save(std::ofstream& os);
  
  virtual ~Inventory();
  bool canAdd(Item* new_item);
  void add(Item* new_item);
  Item* getItemAt(int slot_number);
  int getMoney();
  int numberOfItemsAtSlot(int slot_number);
  void modifyMoney(int money);
  void removeItem(Item* item);
  int getFilledSlotCount();
private:
  GameInterface* game_;
  std::vector<ItemSlot*> item_rep_;
  int money_;
};

#endif  //_INVENTORY_H
